
<?php
//模块插件类
//对外接口函数类，其他插件可通过“$this->plugin('模块名称')->方法名” 来调用本类的方法
defined('BY_JYA') or exit('error');
class func_jy_wxtranslation extends plugin{
	public function translation($from,$to,$openid,$content){
			//$setting=$this->get_setting();
			$appid=pdo_getcolumn('core_account_wechat',array('uniacid'=>$_SESSION['uniacid'],'isdefault'=>1),'appid');
			$token = cfc('account')->getAccessToken();
			$url='http://api.weixin.qq.com/cgi-bin/media/voice/translatecontent?access_token='.$token.'&lfrom='.$from.'&lto='.$to;			
			$result=cfc('http')->ihttp_request($url,$content);			
			return $result['to_content'];
		}
}
?>
